#ifndef __APP_MQTT_H__
#define __APP_MQTT_H__

#define MQTT_BROKER_URL "ws://192.168.10.1:1883"
#define MQTT_CLIENT_ID "2ddf19e8-24ad-11f0-9d95-83ec929a5cdd"
#define MQTT_SUBSCRIBE_TOPIC "web_to_gateway"
#define MQTT_PUBLISH_TOPIC "gateway_to_web"
#define MQTT_PUBLISH_QOS 1

/**
 * @brief 初始化MQTT
 */
int app_mqtt_init(void);

/**
 * @brief 发送MQTT消息
 *
 */
int app_mqtt_publish(char *payload);

/**
 * @brief MQTT消息接收回调函数
 *
 */
int app_mqtt_recv_callback(int (*callback)(char *));

/**
 * @brief 销毁MQTT
 *
 */
void app_mqtt_destroy(void);

#endif /* __APP_MQTT_H__ */